import 'package:json_annotation/json_annotation.dart';
part 'subjectList.g.dart';

@JsonSerializable()
class SubjectListResult {
  final bool success;
  final String message;
  final int total;
  List<SubjectInfo> data;

  SubjectListResult(
    this.success,
    this.message,
    this.total,
    this.data,
  );

  factory SubjectListResult.fromJson(Map json) =>
      _$SubjectListResultFromJson(json);
  Map toJson() => _$SubjectListResultToJson(this);
}

@JsonSerializable()
class SubjectInfo {
  int id;
  int taskId;
  int collectId;
  String taskCode;
  String customerName;
  String largeName;
  String subName;
  String code;
  String checkTime;
  String createTime;
  String verdictType;
  String verdictTypeText;
  String reportNos;
  String generateStatus;

  SubjectInfo(
    this.id,
    this.taskId,
    this.collectId,
    this.taskCode,
    this.customerName,
    this.largeName,
    this.subName,
    this.code,
    this.checkTime,
    this.createTime,
    this.verdictType,
    this.verdictTypeText,
    this.reportNos,
    this.generateStatus,
  );

  factory SubjectInfo.fromJson(Map json) => _$SubjectInfoFromJson(json);
  Map toJson() => _$SubjectInfoToJson(this);
}
